<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="dictionary">
        <HTML>
            <BODY>
                <style>
                    body {
                    font-family: Verdana, serif;
                    }
                    table {
                    width: 950px;
                    border: none;
                    border-collapse: collapse;
                    font-size:0.8em;
                    }

                    h2{
                    font-size:1.1em;
                    font-decoration:bold;
                    }

                    h3{
                    font-size:0.9em;
                    font-style:italic;font-weight:bold
                    }

                    li {
                    font-size:0.8em;
                    padding: 0 2em;
                    }

                    td,th{
                    padding: 0 2em;
                    border-bottom: 2px solid #CCC;
                    }
                </style>
                <h2>English - Dutch Dictionary</h2>

                <xsl:apply-templates select="word"/>

            </BODY>
        </HTML>
    </xsl:template>

    <xsl:template match="word">
        <h3>
            <xsl:value-of select="@name"/>
        </h3>
        <UL>
            <xsl:apply-templates select="meaning"/>
        </UL>

        <i>Translation examples</i>

        <TABLE ALIGN="left" class="content">
            <TR>
                <TH>English</TH>
                <TH>Dutch</TH>
                <TH ALIGN="right">Score</TH>
            </TR>
            <xsl:for-each select="example">
                <xsl:sort select="@score" data-type="number" order="descending"/>
                <TR>
                    <xsl:apply-templates select="english"/>
                    <xsl:apply-templates select="dutch"/>
                    <td>
                        <xsl:value-of select="@score"/>
                    </td>
                </TR>
            </xsl:for-each>


        </TABLE>

    </xsl:template>

    <xsl:template match="meaning">
        <LI>
            <xsl:apply-templates/>
        </LI>
    </xsl:template>


    <xsl:template match="english">
        <TD>
            <xsl:apply-templates/>
            <BR>
                <a>
                    <xsl:attribute name="href">
                        <xsl:value-of select="@url"/>
                    </xsl:attribute>
                    <xsl:value-of select="@urlName"/>
                </a>
            </BR>
        </TD>
    </xsl:template>

    <xsl:template match="dutch">
        <TD>
            <xsl:apply-templates/>
            <BR>
                <a>
                    <xsl:attribute name="href">
                        <xsl:value-of select="@url"/>
                    </xsl:attribute>
                    <xsl:value-of select="@urlName"/>
                </a>
            </BR>
        </TD>
    </xsl:template>


</xsl:stylesheet>
